package com.myiam.idm.portal.beans;

import javax.enterprise.inject.Model;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotEmpty;

public  @Model class IdentityModelBean {

	private String header = "save";
	
	
	private String searchString;
	
	private void search() {
		System.out.println("search");
		
	}
	

	public String create() {
		
		System.out.println("create");
		return "success";
	}
	
	
	
	public String getSearchString() {
		return searchString;
	}


	public void setSearchString(String searchString) {
		this.searchString = searchString;
	}
	private String employeeId;
	private String firstName;
	private String lastName;
	
	
	
	public String getHeader() {
		return header;
	}
	
	@NotNull
	@NotEmpty
	@Pattern(regexp = "[A-Za-z0-9]*", message = "must contain only letters and numbers")
	public String getEmployeeId() {
		return employeeId;
	}
	
	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}
	
	@NotNull
	@NotEmpty
	@Pattern(regexp = "[A-Za-z]*", message = "must contain only letters")
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	@NotNull
	@NotEmpty
	@Pattern(regexp = "[A-Za-z]*", message = "must contain only letters")
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	
	
	
}
